//
//  BGNavigationViewController.swift
//  Baga
//
//  Created by 飞王 on 16/12/21.
//  Copyright © 2016年 飞王. All rights reserved.
//

import UIKit

class BGNavigationViewController: UINavigationController {
    
    // for change statusBarStyle
    open var statusBarColor:UIStatusBarStyle? {
        didSet{
            setNeedsStatusBarAppearanceUpdate();
        }
    }
    
    override var preferredStatusBarStyle: UIStatusBarStyle {
        
        if statusBarColor != nil {
            return statusBarColor!;
        } else {
            return UIStatusBarStyle.default;
        }
    }
//

    override func viewDidLoad() {
        super.viewDidLoad()
        
        navigationBar.setBackgroundImage(UIImage(named:"header_bg") , for: UIBarMetrics.default);

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
//    preferredStatusBarStyle
//    override func preferredStatusBarStyle
    
    
    
    
}
